class turnplate extends egret.DisplayObjectContainer{
	public constructor() {
		super();
		this.addEventListener( egret.Event.ADDED_TO_STAGE, this.onAddToStage, this);
	}
	
	private async onAddToStage( event: egret.Event ){
		await RES.loadConfig("/resource/zq.res.json", "resource/");
		await RES.loadGroup("preload");
		this.createScene();
	}

	private createScene(){
		var sky:egret.Bitmap = new egret.Bitmap();
		sky.texture = RES.getRes('bg');
		console.log(sky)
		this.addChild(sky);
		
        let stageW = this.stage.stageWidth;
        let stageH = this.stage.stageHeight;
        sky.width = stageW;
		
        sky.height = stageH;
		console.log(sky)
		
	}
}